home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BorderStyle = 3 'Fixed Double
- Caption = "Light Lib Images"
- ClientHeight = 7932
- ClientLeft = 696
- ClientTop = 792
- ClientWidth = 10572
- Height = 8676
- Icon = PEOPLE.FRX:0000
- Left = 648
- LinkTopic = "Form1"
- ScaleHeight = 7932
- ScaleWidth = 10572
- Top = 96
- Width = 10668
- Begin CommonDialog CMDialog1
- DialogTitle = "Select Image file"
- Filter = "BMP (*.bmp)|*.BMP|TIF (*.tif)|*.TIF|PCX (*.pcx)|*.PCX|GIF (*.gif)|*.GIF|JPG (*.jpg)|*.JPG"
- Left = 6600
- Top = 7320
- End
- Begin CommandButton Command2
- Caption = "Delete"
- Height = 615
- Left = 9240
- TabIndex = 27
- Top = 7200
- Width = 1215
- End
- Begin CommandButton Command1
- Caption = "Add"
- Height = 615
- Left = 7320
- TabIndex = 28
- Top = 7200
- Width = 1215
- End
- Begin TextBox Text13
- DataField = "Phone"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 14
- Text = "Phone"
- Top = 6240
- Width = 1815
- End
- Begin TextBox Text12
- DataField = "Zip"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 13
- Text = "ZIP"
- Top = 5760
- Width = 1815
- End
- Begin TextBox Text11
- DataField = "Country"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 12
- Text = "Country"
- Top = 5280
- Width = 3975
- End
- Begin TextBox Text10
- DataField = "State"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 11
- Text = "State"
- Top = 4800
- Width = 3975
- End
- Begin TextBox Text9
- DataField = "City"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 10
- Text = "City"
- Top = 4320
- Width = 3975
- End
- Begin TextBox Text8
- DataField = "Addr2"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 9
- Text = "Address 2"
- Top = 3840
- Width = 3975
- End
- Begin TextBox Text6
- DataField = "Hair"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 8
- Text = "Hair"
- Top = 2760
- Width = 1575
- End
- Begin TextBox Text5
- DataField = "Eyes"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 7
- Text = "Eyes"
- Top = 2280
- Width = 1575
- End
- Begin TextBox Text4
- DataField = "BirthDate"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 6
- Text = "BirthDate"
- Top = 1800
- Width = 2055
- End
- Begin TextBox Text3
- DataField = "SizeCM"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 5
- Text = "Size"
- Top = 1320
- Width = 735
- End
- Begin LightLibImage Image1
- Prop26 = -1 'True
- Prop14 = -1 'True
- Prop18 = -1 'True
- Prop15 = -1 'True
- Prop17 = -1 'True
- Prop24 = -1 'True
- Prop13 = -1 'True
- Prop21 = -1 'True
- Prop23 = -1 'True
- Prop22 = -1 'True
- Prop25 = -1 'True
- Prop12 = -1 'True
- Prop19 = -1 'True
- Prop20 = -1 'True
- Dummy = 0
- Error = 0
- ExecFunc = ""
- FileName = "c:\lightlib\samples\G_256_01.BMP"
- Height = 4335
- Left = 6120
- ParLog1 = 0 'False
- ParLog2 = 0 'False
- ParLog3 = 0 'False
- ParNum1 = 0
- ParNum2 = 0
- ParNum3 = 0
- ParStr1 = ""
- ParStr2 = ""
- ParStr3 = ""
- Top = 120
- Prop11 = -1 'True
- Width = 4455
- Zoom_X = 3.228
- Zoom_Y = 3.228
- End
- Begin TextBox Text14
- DataField = "Image256"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 4
- Text = "Image256"
- Top = 6840
- Width = 1935
- End
- Begin TextBox Text7
- DataField = "Addr1"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 3
- Text = "Address 1"
- Top = 3360
- Width = 3975
- End
- Begin TextBox Text2
- DataField = "FirstName"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 2
- Text = "FirstName"
- Top = 840
- Width = 4095
- End
- Begin TextBox Text1
- DataField = "Name"
- DataSource = "Data1"
- Height = 375
- Left = 1680
- TabIndex = 0
- Text = "Name"
- Top = 360
- Width = 4095
- End
- Begin Data Data1
- Connect = ""
- DatabaseName = "C:\LIGHTLIB\MSVB\PEOPLE.MDB"
- Exclusive = 0 'False
- Height = 375
- Left = 0
- Options = 0
- ReadOnly = 0 'False
- RecordSource = "People"
- Top = 7560
- Width = 6015
- End
- Begin Label Label13
- Caption = "Image"
- Height = 255
- Left = 360
- TabIndex = 26
- Top = 6840
- Width = 1095
- End
- Begin Label Label12
- Caption = "Phone"
- Height = 255
- Left = 360
- TabIndex = 25
- Top = 6240
- Width = 1095
- End
- Begin Label Label11
- Caption = "ZIP"
- Height = 255
- Left = 360
- TabIndex = 24
- Top = 5760
- Width = 975
- End
- Begin Label Label10
- Caption = "Country"
- Height = 255
- Left = 360
- TabIndex = 23
- Top = 5280
- Width = 855
- End
- Begin Label Label9
- Caption = "State"
- Height = 255
- Left = 360
- TabIndex = 22
- Top = 4800
- Width = 855
- End
- Begin Label Label8
- Caption = "City"
- Height = 255
- Left = 360
- TabIndex = 21
- Top = 4320
- Width = 855
- End
- Begin Label Label7
- Caption = "Address"
- Height = 255
- Left = 360
- TabIndex = 20
- Top = 3480
- Width = 975
- End
- Begin Label Label6
- Caption = "Hair"
- Height = 255
- Left = 360
- TabIndex = 19
- Top = 2880
- Width = 1095
- End
- Begin Label Label5
- Caption = "Eyes"
- Height = 255
- Left = 360
- TabIndex = 18
- Top = 2400
- Width = 975
- End
- Begin Label Label4
- Caption = "Birthdate"
- Height = 255
- Left = 360
- TabIndex = 17
- Top = 1800
- Width = 1095
- End
- Begin Label Label3
- Caption = "Size"
- Height = 255
- Left = 360
- TabIndex = 16
- Top = 1320
- Width = 1095
- End
- Begin Label Label2
- Caption = "First Name"
- Height = 255
- Left = 360
- TabIndex = 15
- Top = 840
- Width = 1215
- End
- Begin Label Label1
- Caption = "Name"
- Height = 255
- Left = 360
- TabIndex = 1
- Top = 360
- Width = 1215
- End
- Begin Shape Shape1
- Height = 7335
- Left = 120
- Shape = 4 'Rounded Rectangle
- Top = 120
- Width = 5895
- End
- Begin Menu File
- Caption = "&File"
- Begin Menu Open
- Caption = "&Open"
- End
- Begin Menu Close
- Caption = "&Close"
- End
- End
- Begin Menu Edit
- Caption = "&Edit"
- Begin Menu First
- Caption = "&First"
- End
- Begin Menu Next
- Caption = "&Next"
- End
- Begin Menu Previous
- Caption = "&Previous"
- End
- Begin Menu Last
- Caption = "&Last"
- End
- End
- Begin Menu Image
- Caption = "&Image"
- Begin Menu Zoomx2
- Caption = "&Zoom x 2"
- End
- Begin Menu ZoomM2
- Caption = "Z&oom / 2"
- End
- Begin Menu FitIntoWindow
- Caption = "&Fit into window"
- End
- Begin Menu Sep1
- Caption = "-"
- End
- Begin Menu Rotate90
- Caption = "&Rotate 90"
- End
- Begin Menu Rotate180
- Caption = "R&otate180"
- End
- Begin Menu Rotate270
- Caption = "Ro&tate270"
- End
- Begin Menu Sep2
- Caption = "-"
- End
- Begin Menu Print
- Caption = "&Print"
- End
- Begin Menu Scan
- Caption = "&Scan"
- End
- End
- Sub Close_Click ()
- End
- End Sub
- Sub Command1_Click ()
- Data1.Recordset.AddNew
- End Sub
- Sub Command2_Click ()
- Data1.Recordset.Delete
- End Sub
- Sub Data1_Reposition ()
- If Text14.Text = "" Then
- Image1.FileName = LightLibInstallPath("") + "g_256_11.bmp"
- Else
- Image1.FileName = LightLibInstallPath("") + Text14.Text
- End If
- End Sub
- Sub First_Click ()
- Data1.Recordset.MoveFirst
- End Sub
- Sub FitIntoWindow_Click ()
- Image1.ParStr1 = "WINDOW"
- Image1.ExecFunc = "FIT"
- End Sub
- Sub Form_Load ()
- Data1.DatabaseName = LightLibInstallPath("") + "PEOPLE.MDB"
- End Sub
- Sub Image1_DblClick ()
- On Error Resume Next
- Dim OpenFileName As String
- Form1.CMDialog1.InitDir = "C:\LIGHTLIB\SAMPLES"
- Form1.CMDialog1.CancelError = True
- Form1.CMDialog1.Filename = ""
- Form1.CMDialog1.Action = 1
- If Err <> 32755 Then 'user pressed cancel
- OpenFileName = Form1.CMDialog1.Filename
- End If
- If Len(OpenFileName) > 0 Then
- Text14.Text = Form1.CMDialog1.Filetitle
- Image1.FileName = OpenFileName
- End If
- End Sub
- Sub Last_Click ()
- Data1.Recordset.MoveLast
- End Sub
- Static Function LightLibInstallPath (ByVal cNewPath As String)
- Static cPath As String
- If cNewPath = "" Then
- If cPath = "" Then
- cPath = "C:\LIGHTLIB\SAMPLES\"
- End If
- Else
- cPath = cNewPath
- End If
- LightLibInstallPath = cPath
- End Function
- Sub Next_Click ()
- Data1.Recordset.MoveNext
- If Data1.Recordset.EOF Then
- Data1.Recordset.MoveLast
- End If
- End Sub
- Sub Open_Click ()
- Image1_DblClick
- End Sub
- Sub Previous_Click ()
- Data1.Recordset.MovePrevious
- If Data1.Recordset.BOF Then
- Data1.Recordset.MoveFirst
- End If
- End Sub
- Sub Print_Click ()
- Image1.ParLog1 = False
- Image1.ExecFunc = "PRINT"
- End Sub
- Sub Rotate180_Click ()
- Image1.ParNum1 = 180
- Image1.ExecFunc = "ROTATE"
- End Sub
- Sub Rotate270_Click ()
- Image1.ParNum1 = 270
- Image1.ExecFunc = "ROTATE"
- End Sub
- Sub Rotate90_Click ()
- Image1.ParNum1 = 90
- Image1.ExecFunc = "ROTATE"
- End Sub
- Sub Scan_Click ()
- Image1.ExecFunc = "SCAN"
- End Sub
- Sub ZoomM2_Click ()
- Image1.ParNum1 = 1 / 2
- Image1.ParNum2 = 1 / 2
- Image1.ParStr1 = "FACTOR"
- Image1.ExecFunc = "ZOOM"
- End Sub
- Sub Zoomx2_Click ()
- Image1.ParNum1 = 2
- Image1.ParNum2 = 2
- Image1.ParStr1 = "FACTOR"
- Image1.ExecFunc = "ZOOM"
- End Sub
-